"DESCRIPTION 1"="By default, the Device Manager (devmgmt.msc) does not show so called "Phantom Devices" (Devices that have drivers installed but are currently not connected to the system)."
"DESCRIPTION 2"="By activating this option, the Device Manager will also show "Phantom Devices"."
"AUTHOR"="Xteq Systems"
"CONTACTURL"="http://www.xteq.com"
"COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
"COMMENT 1"=""
'Declaration of some constants
sF="C:\AUTOEXEC.BAT"
sV1="SET DEVMGR_SHOW_NONPRESENT_DEVICES="
'Called when the Plugin is started
Sub Plugin_Initialize
Call FileSetAttribute(sF,"R-")
Call FileSetAttribute(sF,"H-")
TxtOpen(sF)
i=TxtFindLine(sV1,false) 'search for string, ignoring case
if i>0 then
s=TxtGetLine(i)
'strip out the part after the "="
i=InStr(s,"=") 'find where "=" appears
s=Right(s,len(s)-i) 'extract the part after the "="
s=trim(s)
if s="1" then SetUIElement 1,true
end if
End Sub
'Called when the Plugin should apply the changes
Sub Plugin_Apply(ElementIndex,ElementSubIndex)
if GetUIElement(1)=true then
s="1"
else
s="0"
end if
i=TxtFindLine(sV1,false) 'search for text, ignoring case
Call TxtSetLine(i,sV1 & s) 'write to file
Call FileBackup(sF) 'backup file
Call TxtSave() 'save file
Call Restart()
End Sub
'Called when the Plugin is about to be removed from memory